export function setStorage(k: string, v: JSON) {
  try {
    localStorage.setItem(k, JSON.stringify(v))
  } catch (error) {
    console.log(error)
  }
}
export function getStorage(k: string) {
  try {
    const res = localStorage.getItem(k)
    if (res) {
      return JSON.parse(res)
    }
    return null
  } catch (error) {
    console.log(error)
  }
}
export function removeStorage(k: string) {
  try {
    localStorage.removeItem(k)
  } catch (error) {
    console.log(error)
  }
}
export function clearStorage() {
  localStorage.clear()
}
